<!DOCTYPE html>
<html>
<head>
    {include file="public/header" /}
</head>
<body>
<div class="layui-form layuimini-form">
    <div class="layuimini-main">

        <form class="layui-form" action="">
            <input type="hidden" name="id" value="{$info.id}">
            <input type="hidden" name="level" value="{$info.earnings_level}">
            <div class="layui-form-item">
                <label class="layui-form-label">手机号</label>
                <div class="layui-input-block">
                    <input type="text"  value="{$info.phone}" readonly autocomplete="off"  class="layui-input iwidth" aria-disabled="true">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">玩家名称</label>
                <div class="layui-input-block">
                    <input type="text" value="{$info.name}" readonly autocomplete="off"  class="layui-input iwidth" aria-disabled="true">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">行业名称</label>
                <div class="layui-input-block">
                    <input type="text"  value="{$info.industry_title}" readonly autocomplete="off"  class="layui-input iwidth" aria-disabled="true">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">归属团队</label>
                <div class="layui-input-block">
                    <input type="text"  value="{$info.team_title}" readonly autocomplete="off"  class="layui-input iwidth" aria-disabled="true">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">投放金额</label>
                <div class="layui-input-block">
                    <input type="text"  value="{$info.sale_price}" readonly autocomplete="off"  class="layui-input iwidth" aria-disabled="true">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">收益周期</label>
                <div class="layui-input-block">
                    <input type="text"  value="{$info.growth_cycle}" readonly autocomplete="off" placeholder="appid" class="layui-input iwidth" aria-disabled="true">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">收益比例</label>
                <div class="layui-input-block">
                    <input type="text"  value="{$info.earnings_ratio}" readonly autocomplete="off" placeholder="appid" class="layui-input iwidth" aria-disabled="true">
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label required">优先等级</label>
                <div class="layui-input-block">
                    <input type="radio" name="precedence" lay-filter="precedence" value="1" title="优先" {if condition="$info.precedence==1"}checked=""{/if}>
                    <input type="radio" name="precedence" lay-filter="precedence" value="2" title="不优先" {if condition="$info.precedence==2"}checked=""{/if}>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">匹配要求</label>
                <div class="layui-input-block">
                    <input type="text" name="plurs_grid" value="{$info.plurs_grid}"  autocomplete="off" class="layui-input iwidth" aria-disabled="true">
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-input-block">
                    <button class="layui-btn" lay-submit="" lay-filter="add">保存</button>
                </div>
            </div>
        </form>

    </div>
</div>

{include file="public/footer" /}

<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
    layui.use(['form', 'layedit', 'laydate','wangEditor'], function () {
        var form = layui.form
            , layer = layui.layer
            , layedit = layui.layedit
            , laydate = layui.laydate
            , wangEditor = layui.wangEditor
            , $ = layui.jquery;
        //监听提交修改
        form.on('submit(add)', function (data) {
            let  postdata =data.field
            $.ajax({
                url: '/admin/TransactionData/lanunch_write?action=ajax',
                type: 'post',
                dataType: 'json',
                data: postdata,
                success: function (res) {
                    if (res.status == true) {    // 获得frame索引
                        parent.layer.msg("操作成功!",
                            {
                                icon:1,
                                time: 1000
                            },
                            function () {
                                parent.location.reload();
                        });
                        return;
                    } else{
                        layer.msg(res.msg,{ icon:5,
                            time: 1000});
                    }
                },
                error: function () {
                    layer.msg("报错了");
                }
            });
            return false;
        });
    });




</script>
</body>
</html>